
$(function () {
    setCompanyData(commonData.companyModel);
    setNavData(commonData.navList);
});
function setCompanyData(data) {
    // $("#logohtml").html('<img src="'+data.logo+'" id="companyLogo" height="141" width="204"/>')
    $("#companyLogo").attr("src", data.logo);
    $("#companyPhone").html(data.phone);
    $("#companyAd").html(data.ad);
    $("#companyNet").html(data.net);
    $("#companyEmail").html(data.email);
    $("#companyLinePhone").html(data.linePhone);
    $("#companyAddress").html(data.address);
    $("#companyVersion").html(data.version);

}

function setNavData(data) {
    let html = '<ul>';
    for (let i = 0; i < data.length; i++) {
        html += '<a href="' + data[i].href + '">\n' +
            '                    <li>' + data[i].title + '</li>\n' +
            '                </a>';
    }
    html += '</ul>';
    $("#homeNav").html(html);
}
